export const useSearchForm = [
  {
    field: 'name',
    label: '商品名称',
    component: 'Input'
  }
]

export const columns = [
  {
    prop: 'id',
    label: '编号',
    align: 'center'
  },
  {
    prop: 'name',
    label: '商品名称',
    align: 'center'
  },
  {
    prop: 'picUrl',
    label: '商品图片',
    align: 'center',
    slots: {
      name: 'picUrl'
    }
  },
  {
    prop: 'price',
    label: '商品价格',
    align: 'center',
    formatter: (row: any) => {
      return row.price || row.price === 0 ? row.price / 100 + '元' : '-'
    }
  },
  {
    prop: 'marketPrice',
    label: '市场价',
    align: 'center',
    formatter: (row: any) => {
      return row.marketPrice || row.marketPrice === 0 ? row.marketPrice / 100 + '元' : '-'
    }
  }
]

export const responseStructure = {
  data: 'list',
  total: 'total'
}
